package com.erp.erp_entitys.Inquiry;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * 询盘登记-历史记录
 */
@ApiModel(value = "询盘登记-历史记录实体类")
public class InquiryRecordEntity {
    /**
     * 主键
     */
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 询盘id
     */
    @ApiModelProperty(value = "询盘id")
    private Integer inquiryId;

    /**
     * 产品id
     */
    @ApiModelProperty(value = "产品id")
    private Integer productId;

    /**
     * 产品编码
     */
    @ApiModelProperty(value = "产品编码")
    private String productNo;

    /**
     * 规格编码
     */
    @ApiModelProperty(value = "规格编码")
    private String specNo;

    /**
     * 规格说明
     */
    @ApiModelProperty(value = "规格说明")
    private String normExplain;

    /**
     * 理论单价
     */
    @ApiModelProperty(value = "理论单价")
    private BigDecimal price;

    /**
     * 数量
     */
    @ApiModelProperty(value = "数量")
    private BigDecimal amount;

    /**
     * 金额小计
     */
    @ApiModelProperty(value = "金额小计")
    private BigDecimal priceSubtotal;

    /**
     * 询价工厂
     */
    @ApiModelProperty(value = "询价工厂")
    private String factory;

    /**
     * 工厂售价
     */
    @ApiModelProperty(value = "工厂售价")
    private BigDecimal cost;

    /**
     * 询价第几次
     */
    @ApiModelProperty(value = "询价第几次")
    private Integer frequency;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getInquiryId() {
        return inquiryId;
    }

    public void setInquiryId(Integer inquiryId) {
        this.inquiryId = inquiryId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getSpecNo() {
        return specNo;
    }

    public void setSpecNo(String specNo) {
        this.specNo = specNo;
    }

    public String getNormExplain() {
        return normExplain;
    }

    public void setNormExplain(String normExplain) {
        this.normExplain = normExplain;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getPriceSubtotal() {
        return priceSubtotal;
    }

    public void setPriceSubtotal(BigDecimal priceSubtotal) {
        this.priceSubtotal = priceSubtotal;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    public Integer getFrequency() {
        return frequency;
    }

    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        InquiryRecordEntity that = (InquiryRecordEntity) o;
        return id.equals(that.id) &&
                inquiryId.equals(that.inquiryId) &&
                productId.equals(that.productId) &&
                productNo.equals(that.productNo) &&
                Objects.equals(specNo, that.specNo) &&
                Objects.equals(normExplain, that.normExplain) &&
                Objects.equals(price, that.price) &&
                Objects.equals(amount, that.amount) &&
                Objects.equals(priceSubtotal, that.priceSubtotal) &&
                Objects.equals(factory, that.factory) &&
                Objects.equals(cost, that.cost);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, inquiryId, productId, productNo, specNo, normExplain, price, amount, priceSubtotal, factory, cost);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append(" \"id\":").append(id);
        sb.append(", \"inquiryId\":").append(inquiryId);
        sb.append(", \"productId\":").append(productId);
        sb.append(", \"productNo\":\"").append(productNo).append('\"');
        sb.append(", \"specNo\":\"").append(specNo).append('\"');
        sb.append(", \"normExplain\":\"").append(normExplain).append('\"');
        sb.append(", \"price\":").append(price);
        sb.append(", \"amount\":").append(amount);
        sb.append(", \"priceSubtotal\":").append(priceSubtotal);
        sb.append(", \"factory\":\"").append(factory).append('\"');
        sb.append(", \"cost\":").append(cost);
        sb.append(", \"frequency\":").append(frequency);
        sb.append('}');
        return sb.toString();
    }
}